package Day11.Ti.ZiJie;

import java.io.*;

public class Ti03 {
    public static void main(String[] args) throws IOException {
//        method1();
//        return;
        BufferedInputStream bis=new BufferedInputStream(new FileInputStream("H:\\itheima\\aa\\qqq.png"));
        BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream("H:\\itheima\\bb\\qqq.png"));
        int b;
        while ((b=bis.read())!=-1){
            bos.write(b);
        }
        bis.close();
        bos.close();
    }

    private static void method1() throws IOException {
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("H:\\itheima\\aa\\qqq.png"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("H:\\itheima\\bb\\qqq.png"));
        byte[] bytes = new byte[1024];
        int len;
        while ((len = bis.read(bytes)) != -1) {
            bos.write(bytes, 0, len);
        }
        bis.close();
        bos.close();
    }

}
